﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Text;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using PlugNT.Cms.Core;
using PlugNT.Cms.BLL;
using PlugNT.Cms.Model;
using PlugNT.Cms.Page;

namespace PlugNT.Cms.Web.Admin.Pre_Global
{
    public partial class SetCommentfilter : AdminPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //权限检测
            this.CheckPower();

            if (!IsPostBack)
            {
     
                InitData();
            }
        }

        private void InitData()
        {
            txtCommentfilter.Text = Sys.Info.commentfilter;
        }

        protected void imgBtnUpdate_Click(object sender, System.Web.UI.ImageClickEventArgs e)
        {
            Sys.Info.commentfilter = txtCommentfilter.Text.Trim();
            if (Sys.UpdateCommentfilter())
            {
                Response.Redirect("../Message.aspx?message=修改权限代码成功！&z=yes");
            }
            else
            {
                Response.Redirect("../Message.aspx?message=修改权限代码失败！&z=no");
            }
        }
    }
}
